<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="/res/third/bootstrap3/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="/res/common/js/jquery.1.9.1.min.js" type="text/javascript"></script>
<script src="/res/third/artDialog/jquery.artDialog.js" type="text/javascript"></script>
<script src="/res/third/validate/jquery.validate.js" type="text/javascript"></script>
<script src="/res/third/easyUI/jquery.easyui.min.js" type="text/javascript"></script>
<script src="/res/third/easyUI/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
<script type="text/javascript">
	function sosuo(){
		var lpath =location.pathname;
		//var pageNo = $("#pageNo").val();
		$("#soform").attr("action",lpath+"?pageNo="+1);
		$("#soform").submit();
	}

</script>
<style type="text/css">
	.excelbtn{display: inline-block;height: 100%;width: 100px;background-color:#38A4C7;color: #fff;text-align: center;line-height: 35px;cursor: pointer;border-radius:5px;}
</style>
</head>

<body>
	<div class="panel panel-info panel-content">
	<div class="panel-heading" style="position: relative;">
			<form id="soform" method="post">
				 
			</form>
		</div>
		<table class="table table-hover table-bordered table-striped table-condensed">
			<thead>
				<tr>
					<th width="17%">供应商名称</th>
					<th width="15%">签约日期</th>
					<th width="15%">应收阶段</th>
					<th width="15%">应收返点金额</th>
					<th width="15">已收款金额</th>
					<th width="20%">操作</th>
				</tr>
			</thead>
			[#list pagination.list as cenCollect]
			<tr>
				<td align="center">${cenCollect.companyName!}</td>
				<td align="center">${(cenCollect.signintime?string("yyyy-MM-dd"))!}</td>
				<td align="center">${cenCollect.jdName!}</td>
				<td align="center">
						￥${cenCollect.mon?string('0.00')!}元
				</td>
				<td align="center">
                    ￥${cenCollect.alreadyAmount!}元<span style="color:red;font-weight: bold;cursor: pointer;" onclick="showmingxi('${cenCollect.cenMemberId!}')">明细</span>
				</td>
				<td align="center"> 
				 [#if cenCollect.mon > cenCollect.alreadyAmount]
				 <button type="button" class="btn btn-primary btn-xs delbtn" onclick="getmoney('${cenCollect.cenMemberId!}')">确认收款</button>
				 [#else]
				 <span style="color:red;font-weight: bold;">已收款</span>
				[/#if]
				</td>
			</tr>
			[/#list]
		</table>

		<div class="panel-footer">[@fenye p = pagination form = 'infoForm' /]</div>
		 
	</div>
	
	
	<div id="editoraddView" style="width: 600px; height: 300px; display: none;overflow-y:auto;overflow-x:hidden;">
	</div>
</body>
</html>
<script type="text/javascript">
function showmingxi(memberId) {
	top.addTab('收款明细', "/member/collect_detail.do?state=1&memberId="+memberId);
}

function getmoney(memberid){
	$.ajax({
        url : '/member/back_money_view.do',
        type : 'post',
        data:{cenMemberId : memberid},
        success : function(data) {
        	if(data){
        		$("#editoraddView").html(data);
        		dialog = art.dialog({
        			title : "返点收款",
        			lock : true,
        			content :$("#editoraddView")[0]
        		})
        	}
        }
    })
		 
}

 
</script>